package com.xydtech.ecard.ftp.enums;

/**
 * @Author: liliya
 * @Description: 结果汇总-定价方法
 * @Date: Created in 2023/8/15 19:25
 * @Modified:
 */

public enum FtpPricingMethodEnum {

    UNIT_CURRENT_DEPOSIT(1,"单位活期(指定利率单位活期)"),
    PERSONAL_CURRENT_DEPOSIT(2,"个人活期(指定利率个人活期)"),
    MATURITY_MATCHING(3,"期限匹配法"),
    AVERAGE_CAPITAL(4,"等额本金"),
    AVERAGE_CAPITAL_PLUS_INTEREST(5,"等额本息"),
    REPAYMENT_SCHEDULE(6,"按还款计划");

    private int value;
    private String label;

    FtpPricingMethodEnum(int value, String label) {
        this.value = value;
        this.label = label;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static FtpPricingMethodEnum values(int code){
        for(FtpPricingMethodEnum enums : FtpPricingMethodEnum.values()){
            if(enums.getValue() == code){
                return enums;
            }
        }
        return null;
    }

}
